# CUDA_VISIBLE_DEVICES=0 `which python` -m torch.distributed.launch train.py --config config/cfg_kitti_fm.py --work_dir log/kitti_fmdepth
import os
# path  = "/home/lin/code/graduation_project/AD-Depth-Estimation/FeatDepth/datasets/my_dataset"
# filename = "img_path.txt"
# path_img = os.listdir(path)
#
# # if not os.path.exists(filename):
# #     os.makedirs(filename)
# file = open(filename,'w')
#
# with open(filename, 'rb') as f:
#     for i in path_img:
#         print(i)
#         f.write(i)

filename = "/home/lin/code/graduation_project/AD-Depth-Estimation/FeatDepth/mono/datasets/splits/exp/1.txt"
filename1 = "/home/lin/code/graduation_project/AD-Depth-Estimation/FeatDepth/mono/datasets/splits/exp/train_files.txt"
f=open(filename,'r')
f1 = open(filename1,'w')
for line in f:
    # print(line)
    # print(line.split(" "))
    if(line.split(" ")[0]=="2011_09_26/2011_09_26_drive_0001_sync"):
        print(line)
        f1.write(line)
#     txt.append(line.strip())
# print(txt)

